package br.com.sge.entidades;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

/**
 *
 * @author Gustavo Rodrigues Torre
 */
@Entity
@Table(name = "tb_matricula", schema = "sge")
public class Matricula implements Serializable {

	private static final long serialVersionUID = 1L;
	
	@ManyToMany
	@JoinTable(name = "tb_matricula", 
				joinColumns=@JoinColumn(name = "cd_aluno"), 
				inverseJoinColumns = @JoinColumn(name = "cd_disciplina"))
	private List<Aluno> alunos = new ArrayList<Aluno>();
		
    public Matricula() {
    }

	public List<Aluno> getAlunos() {
		return alunos;
	}

	public void setAlunos(List<Aluno> alunos) {
		this.alunos = alunos;
	}
       
}